package com.ffcs.web.model.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Advert entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wechat_advert")
public class Advert implements java.io.Serializable {

	// Fields

	private Integer id;
	private String name;
	private String mark;
	private String url;
	private Short type;
	private Short status;
	private Short advertType;
	private Integer associatedId;
	private Date updateTime;
	
	// Constructors

	/** default constructor */
	public Advert() {
	}

	/** minimal constructor */
	public Advert(String url, Short type, Short status) {
		this.url = url;
		this.type = type;
		this.status = status;
	}

	/** full constructor */
	public Advert(String name, String mark, String url, Short type,
			Short status, Short advertType, Integer associatedId) {
		this.name = name;
		this.mark = mark;
		this.url = url;
		this.type = type;
		this.status = status;
		this.advertType = advertType;
		this.associatedId = associatedId;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "name", length = 30)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "mark", length = 500)
	public String getMark() {
		return this.mark;
	}

	public void setMark(String mark) {
		this.mark = mark;
	}

	@Column(name = "url", nullable = false, length = 200)
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(name = "type", nullable = false)
	public Short getType() {
		return this.type;
	}

	public void setType(Short type) {
		this.type = type;
	}

	@Column(name = "status", nullable = false)
	public Short getStatus() {
		return this.status;
	}

	public void setStatus(Short status) {
		this.status = status;
	}

	@Column(name = "advertType")
	public Short getAdvertType() {
		return this.advertType;
	}

	public void setAdvertType(Short advertType) {
		this.advertType = advertType;
	}

	@Column(name = "associatedId")
	public Integer getAssociatedId() {
		return this.associatedId;
	}

	public void setAssociatedId(Integer associatedId) {
		this.associatedId = associatedId;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updateTime")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	

}